<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":"
            + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<%=basePath%>">
    <script src="resources/js/base.js"></script>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	      <title>在线课件</title>
</head>
<body>
		<%@ include file="../common/navbar.jsp"%>	
		<div class="container">
		<c:if test="${not empty tip_error }">
		<div class="alert alert-danger  center-block">
			<strong>警告!</strong> ${tip_error}
		</div>
	</c:if>
	<c:if test="${not empty tip_info }">
		<div class="alert alert-success  center-block">
			<strong>提示!</strong> ${tip_info}
		</div>
	</c:if>
			<div class="row">
		<div class="col-md-12">
		<h2>${bbs.bbsname }</h2>
		<form class="form-inline"  action="commentadd">
				<div class="form-group">
				  <input type="hidden" name="bbsname" value="${bbs.bbsname}">
					<textarea rows="5" cols="100" name="commentstr"></textarea>
				</div>
				<button type="submit" class="btn btn-primary btn-sm">我要评论</button>
			</form>
			<hr/>
		</div>
		</div>
		</div>
	 	<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">我要评论</button>

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
    <div style="padding: 5px">
     	<form class="form-inline"  action="commentadd" >
				<div class="form-group">
				  <input type="hidden" name="bbsname" value="${bbs.bbsname}">
					<textarea rows="5" cols="100" name="commentstr"></textarea>
				</div>
				<button type="submit" class="btn btn-primary btn-sm">我要评论</button>
			</form>
			</div>
    </div>
  </div>
</div> 
<div class="container">
	<div class="row">
		<div class="col-md-12">					
<ul class="media-list">
<c:forEach var="commentlist" items="${commentlist }" varStatus="status">
  <li class="media">
    <div class="media-left">
      <a href="#">
      </a>
    </div>
    <div class="media-body">
      <h4 class="media-heading">
      <c:if test="${not empty commentlist.commentuser }">
      ${commentlist.commentuser }
      </c:if>
      <c:if test="${empty commentlist.commentuser}">
    <span class="label label-default"> 游客(<%=request.getRemoteAddr()  %>)</span>
      </c:if>
      </h4>
      ${userip}
      <p>${commentlist.commentstr }
      <p>${commentlist.createDate }
    </div>
  </li>
  <hr/>
    </c:forEach>
</ul>
	
 
		</div>
	</div>
</div>


</body>
</html>